import QtQuick 2.0

import "../../common"
import "../../../js/util.js" as Util
import "../../../js/UI.js" as Style

Page{
    id: showlist

    ATitle{
        id: m_titleID
        anchors.top: parent.top
        anchors.left: parent.left
        m_text: qsTr("院系设置")
        m_textcol: Style.fonttilteColor
        onBackSignal:subpageSignal(1,-1)
    }

    ListModel{
        id: m_college
        ListElement{
            name:  "建筑管理学院"
            url: "http://www.cqucc.com.cn:8002/jgxy/type/05020201.html"
        }
        ListElement{
            name: "土木工程学院"
            url: "http://www.cqucc.com.cn:8004/tmxy/type/020102.html"
        }
        ListElement{
            name: "建筑学院"
            url: "http://www.cqucc.com.cn:8004/jzxy/type/07010201.html"
        }
        ListElement{
            name: "电气信息学院"
            url: "http://www.cqucc.com.cn:8001/dqxy/type/01020201.html"
        }
        ListElement{
            name: "经济管理学院"
            url: "http://www.cqucc.com.cn:8002/jjglxy/type/0302020101.html"
        }
        ListElement{
            name: "艺术设计学院"
            url: "http://portal.cqucc.com.cn:8004/yssjxy/type1/060140301.html"
        }
        ListElement{
            name: "人文学院"
            url: "http://www.cqucc.com.cn:8003/rwxy/type/04022001.html"
        }
    }

    ListView{
        id: listview
        anchors.top: m_titleID.bottom
        anchors.left: parent.left
        anchors.right: parent.right
        width: parent.width
        height: parent.height - m_titleID.height
        clip: true
        model: m_college
        delegate: BaseLine{
            height: m_lineValue
            width: parent.width
            AText {
                anchors.left: parent.left
                anchors.leftMargin: m_lineValue*0.2
                anchors.verticalCenter: parent.verticalCenter
                text: model.name
                font.pointSize: Style.fontlittlcontent
                color:Style.fonttilteColor
            }
            Image {
                anchors.right: parent.right
                anchors.rightMargin: m_lineValue*0.2
                anchors.verticalCenter: parent.verticalCenter
                sourceSize: Qt.size(m_lineValue*0.3,m_lineValue*0.3)
                source: "qrc:/image/arrow.png"
            }
            onMouseclickSignal: {
                Util.pushView(component,m_objects,"qrc:/qml/form/college/Introduce.qml",m_root_id,{
                              "h_url": model.url})
            }
            SplitLine {
                anchors {
                    bottom: parent.bottom
                    left: parent.left
                    right: parent.right;
                }
            }
        }
    }
}
